import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/msite'
  },
  {
    path:'/msite',
    name:'Msite',
    component:()=> import('@/page/Msite/index.vue'),
    meta:{
      haveBar:true
    }
  },
  {
    path:'/mine',
    name:'Mine',
    component:()=> import('@/page/Mine/index.vue'),
    meta:{
      haveBar:true
    }
  },
  {
    path:'/order',
    name:'Order',
    component:()=> import('@/page/Order/index.vue'),
    meta:{
      haveBar:true
    }
  },
  {
    path:'/search',
    name:'Search',
    component:()=> import('@/page/Search/index.vue'),
    meta:{
      haveBar:true
    }
  },
  {
    path:'/shop/:id',
    name:'Shop',
    component:()=> import('@/page/Shop/')
    

  },
  {
    path:'/login',
    name:'Login',
    component:()=> import('@/page/Login/')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
